package com.alan.camunda.boot.listener;

import com.alan.camunda.boot.dto.MyTxEvent;
import org.springframework.stereotype.Component;
import org.springframework.transaction.event.TransactionPhase;
import org.springframework.transaction.event.TransactionalEventListener;

@Component
public class TransactionListener {


    @TransactionalEventListener(phase = TransactionPhase.AFTER_COMMIT)
    public void handleAfterCommit(MyTxEvent txEvent) {
        System.out.println("handleAfterCommit MyTxEvent");
    }


}
